Optimal. Leaf size=120 \[ \frac {x (a+b x) (A b-a B)}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {a (a+b x) (A b-a B) \log (a+b x)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B x^2 (a+b x)}{2 b \sqrt {a^2+2 a b x+b^2 x^2}} \]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {770, 77} \begin {gather*} \frac {x (a+b x) (A b-a B)}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {a (a+b x) (A b-a B) \log (a+b x)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B x^2 (a+b x)}{2 b \sqrt {a^2+2 a b x+b^2 x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rule 770
Rubi steps
\begin {align*} \int \frac {x (A+B x)}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx &=\frac {\left (a b+b^2 x\right ) \int \frac {x (A+B x)}{a b+b^2 x} \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {\left (a b+b^2 x\right ) \int \left (\frac {A b-a B}{b^3}+\frac {B x}{b^2}+\frac {a (-A b+a B)}{b^3 (a+b x)}\right ) \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {(A b-a B) x (a+b x)}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B x^2 (a+b x)}{2 b \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {a (A b-a B) (a+b x) \log (a+b x)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 57, normalized size = 0.48 \begin {gather*} \frac {(a+b x) (b x (-2 a B+2 A b+b B x)+2 a (a B-A b) \log (a+b x))}{2 b^3 \sqrt {(a+b x)^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.46, size = 231, normalized size = 1.92 \begin {gather*} \frac {\left (-a^2 \sqrt {b^2} B+a^2 (-b) B+a A b^2+a A b \sqrt {b^2}\right ) \log \left (\sqrt {a^2+2 a b x+b^2 x^2}-a-\sqrt {b^2} x\right )}{2 b^4}+\frac {\left (-a^2 \sqrt {b^2} B+a^2 b B-a A b^2+a A b \sqrt {b^2}\right ) \log \left (\sqrt {a^2+2 a b x+b^2 x^2}+a-\sqrt {b^2} x\right )}{2 b^4}+\frac {\sqrt {a^2+2 a b x+b^2 x^2} (-3 a B+2 A b+b B x)}{4 b^3}+\frac {2 a B x-2 A b x-b B x^2}{4 b \sqrt {b^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.39, size = 47, normalized size = 0.39 \begin {gather*} \frac {B b^{2} x^{2} - 2 \, {\left (B a b - A b^{2}\right )} x + 2 \, {\left (B a^{2} - A a b\right )} \log \left (b x + a\right )}{2 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 75, normalized size = 0.62 \begin {gather*} \frac {B b x^{2} \mathrm {sgn}\left (b x + a\right ) - 2 \, B a x \mathrm {sgn}\left (b x + a\right ) + 2 \, A b x \mathrm {sgn}\left (b x + a\right )}{2 \, b^{2}} + \frac {{\left (B a^{2} \mathrm {sgn}\left (b x + a\right ) - A a b \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 66, normalized size = 0.55 \begin {gather*} -\frac {\left (b x +a \right ) \left (-B \,b^{2} x^{2}+2 A a b \ln \left (b x +a \right )-2 A \,b^{2} x -2 B \,a^{2} \ln \left (b x +a \right )+2 B a b x \right )}{2 \sqrt {\left (b x +a \right )^{2}}\, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.76, size = 72, normalized size = 0.60 \begin {gather*} \frac {B x^{2}}{2 \, b} - \frac {B a x}{b^{2}} + \frac {B a^{2} \log \left (x + \frac {a}{b}\right )}{b^{3}} - \frac {A a \log \left (x + \frac {a}{b}\right )}{b^{2}} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} A}{b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x\,\left (A+B\,x\right )}{\sqrt {{\left (a+b\,x\right )}^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.21, size = 37, normalized size = 0.31 \begin {gather*} \frac {B x^{2}}{2 b} + \frac {a \left (- A b + B a\right ) \log {\left (a + b x \right )}}{b^{3}} + x \left (\frac {A}{b} - \frac {B a}{b^{2}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________